import request from '@/utils/request';

export async function instockList(params: any): Promise<any> {
  return request('/api/inventories', {
    params: params,
  });
}

export async function instockDown(params: any): Promise<any> {
  return request('/api/inventory/excel', {
    method: 'GET',
    params: params,
    headers: {
      Accept: 'application/octet-stream',
    },
    responseType: 'arrayBuffer',
  });
}

export async function instockUtil(params: any): Promise<any> {
  return request('/api/wine/units', {
    method: 'GET',
    params: params,
  });
}

export async function instockSpec(params: any): Promise<any> {
  return request('/api/wine/spec/units', {
    method: 'GET',
    params: params,
  });
}
